﻿using Microsoft.AspNetCore.Mvc.Filters;

namespace MES.Process.API
{
    public class MESProcessExceptionFilter : IExceptionFilter
    {
        private readonly ILogger<MESProcessExceptionFilter> _logger;    
        public MESProcessExceptionFilter(ILogger<MESProcessExceptionFilter> logger)
        {
            _logger = logger;
        }
        public void OnException(ExceptionContext context)
        {
            _logger.LogError($"全局异常处理：【{context.Exception.Message}】");
        }
    }
}
